<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>DotnetCoders - UML : Use Case Diagrams</title>



	
		
		<link href="usecase.aspx_files/Sitestyles.css" type="text/css" rel="stylesheet">
		<link href="usecase.aspx_files/Floater.css" type="text/css" rel="stylesheet">
		<link href="usecase.aspx_files/menus.css" type="text/css" rel="stylesheet">
		<link href="usecase.aspx_files/microsoft.css" type="text/css" rel="stylesheet">

				<meta name="Description" content="DotnetCoders.com is a resource site for the Microsoft .NET platform, featuring articles, code samples, MCAD/MCSD study materials, and resources.">
				<meta name="Keywords" content="" dotnet="" dotnetcoders="" .netcoders="" microsoft="" .net="" framework="" c="" csharp="" mcad="" mcsd="" vb.net="" visual="" studio="" articles="" samples="" learning="" examples=""></head><body style="margin: 2px;" bgcolor="black">
		
		<!-- OVERALL PAGE TABLE -->
		<table style="padding-right: 10px; padding-left: 10px; padding-top: 10px;" bgcolor="white" border="0" width="100%">
			<tbody><tr>
				<td valign="top">
					<!-- HEADING -->
					
<!-- PAGE HEADER -->
<table bgcolor="white" border="0" cellpadding="0" cellspacing="0" width="100%">
	<tbody><tr>
		<td rowspan="2" align="left" valign="bottom">
			<!-- LOGO -->
			<a href="http://www.dotnetcoders.com/web/default.aspx" style="text-decoration: none;">
				<img src="usecase.aspx_files/DotNetLogo.jpg" alt=".netCoders" border="0">
			</a>
		</td>
		<td class="SiteHeaderText" align="right" valign="top">
			<!-- SHORTCUT LINKS -->
			<a href="http://www.dotnetcoders.com/web/contactus.aspx">Contact Us</a>
		</td>
	</tr>
	<tr>
		<td align="right" valign="bottom">
			<!-- SEARCH BOX -->
			

<form style="margin-bottom: 5px;" method="get" action="http://search.atomz.com/search/">
<b>Search:</b> <input size="15" name="sp-q" style="height: 20px;">
<input value="Find It" style="border: 1px solid rgb(51, 51, 51); height: 20px; color: rgb(255, 255, 255); background-color: rgb(153, 153, 204); font-family: Verdana; font-size: 8pt; font-weight: bold;" type="submit">
<input name="sp-a" value="sp1001a0fe" type="hidden">
</form>	

		</td><td>
	</td></tr>
</tbody></table>

					
<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tbody><tr>
		<td bgcolor="#000000" valign="bottom" width="100%">
			<!-- BEGIN NAVIGATION BAR -->
			<!-- BEGIN NAVIGATION BAR -->
			<div id="divMenuBar">
				<table id="tblMenuBar" border="0" cellpadding="0" cellspacing="0" width="100%">
					<tbody><tr>
						<td class="clsMenuBarItem" id="tdMenuBarItemHome" align="center" height="20" width="16%">
							<a style="display: block; width: 100%;" href="http://www.dotnetcoders.com/web/default.aspx">Home</a>
						</td>
						<td align="center">
							|
						</td>
						<td class="clsMenuBarItem" id="tdMenuBarItemArticles" align="center" height="20" width="17%">
							<a style="display: block; width: 100%;" href="http://www.dotnetcoders.com/web/Articles/showarticlelist.aspx">Articles</a>
						</td>
						<td align="center">
							|
						</td>
						
						<!--
						<TD CLASS="clsMenuBarItem" ALIGN="center" WIDTH="90" HEIGHT="20" ID="tdMenuBarItemASP.NET">
							<A style="DISPLAY:block; WIDTH:100%" HREF="/web/Articles/showtopic.aspx?topic=2">
								ASP.NET</A>
						</TD>
						<td align="center">
							|
						</td >
						<TD CLASS="clsMenuBarItem" ALIGN="center" WIDTH="90" HEIGHT="20" ID="tdMenuBarItemCSharp">
							<A style="DISPLAY:block; WIDTH:100%" HREF="/web/Articles/showtopic.aspx?topic=5">
								C#</A>
						</TD>
						<td align="center">
							|
						</td>
						<TD CLASS="clsMenuBarItem" ALIGN="center" WIDTH="90" HEIGHT="20" ID="tdMenuBarItemFramework">
							<A style="DISPLAY:block; WIDTH:100%" HREF="/web/Articles/showtopic.aspx?topic=4">
								Framework</A>
						</TD>
						<td align="center">
							|
						</td>
						-->

						<td class="clsMenuBarItem" id="tdMenuBarItemXML" align="center" height="20" width="17%">
							<a style="display: block; width: 100%;" href="http://www.dotnetcoders.com/web/PocketPC/default.aspx">
								Pocket PC</a>
						</td>
						<td align="center">
							|
						</td>
						<td class="clsMenuBarItem" id="tdMenuBarItemCert" align="center" height="20" width="17%">
							<a style="display: block; width: 100%;" href="http://www.dotnetcoders.com/web/learning/cert/default.aspx">
								Certification</a>
						</td>
						
						<td align="center">
							|
						</td>
						<td class="clsMenuBarItem" id="tdMenuBarItemUML" align="center" height="20" width="17%">
							<a style="display: block; width: 100%;" href="http://www.dotnetcoders.com/web/learning/uml/default.aspx">
								UML</a>
						</td>
						
						<td align="center">
							|
						</td>
						<td class="clsMenuBarItem" id="tdMenuBarItemResources" align="center" height="20" width="16%">
							<a style="display: block; width: 100%;" href="http://www.dotnetcoders.com/web/Resources/default.aspx">
								Resources</a>
						</td>
					</tr>
				</tbody></table>
			</div>
			<!-- END NAVIGATION BAR -->
		</td>
	</tr>
</tbody></table>

					<!-- SUBMENU & CONTENT TABLE -->
					<table border="0" width="100%">
						<tbody><tr>
							
							<td style="padding-top: 15px;" valign="top" width="175">
								
<table class="SubMenuTable" border="0" cellpadding="0" cellspacing="0">
	<tbody><tr>
		<td align="center" valign="bottom">
			<!-- SUB MENU HEADER-->
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tbody><tr>
					<td class="SubMenuHead">
						<span id="Header1_LeftNavFloater__ctl0_FltUML1_PreFloater1_lblFloaterTitle">UML</span>
					</td>
				</tr>
			</tbody></table>
		</td>
	</tr>
	<tr style="padding-bottom: 10px;">
		<td align="center" valign="top">
			<!-- SUB MENU CONTENT TABLE -->
			<table class="SubMenuContent" bgcolor="#efefef" border="0" width="100%">
				<tbody><tr>
					<td valign="top">
						<table border="0" cellpadding="3" cellspacing="0" width="100%">
							<tbody><tr>
								<td>

<a href="http://www.dotnetcoders.com/web/learning/uml/default.aspx">UML Home</a><br>

<p>
<b>Structural Diagrams</b><br>
<a href="http://www.dotnetcoders.com/web/learning/uml/diagrams/classdiagram.aspx">
	Class</a><br>
<a href="http://www.dotnetcoders.com/web/learning/uml/diagrams/objectdiagram.aspx">
	Object</a><br>
<a href="http://www.dotnetcoders.com/web/learning/uml/diagrams/component.aspx">Component</a><br>
<a href="http://www.dotnetcoders.com/web/learning/uml/diagrams/deployment.aspx">Deployment</a><br>
</p><p>
<b>Behavioral Diagrams</b><br>
<a href="http://www.dotnetcoders.com/web/learning/uml/diagrams/usecase.aspx">Use 
	Case</a><br>
<a href="http://www.dotnetcoders.com/web/learning/uml/diagrams/sequence.aspx">Sequence</a><br>

<a href="http://www.dotnetcoders.com/web/learning/uml/diagrams/collaboration.aspx">
	Collaboration</a><br>
<a href="http://www.dotnetcoders.com/web/learning/uml/diagrams/statechart.aspx">Statechart</a><br>
<a href="http://www.dotnetcoders.com/web/learning/uml/diagrams/activity.aspx">Activity</a><br>

</p></td> </tr> </tbody></table> </td></tr> </tbody></table> </td></tr> </tbody></table>



							</td>
							
							<td class="FrameworkContent" style="padding-left: 20px; padding-top: 15px;" valign="top">
<!-- START CONTENT -->

<h1>Use Case Diagrams</h1>
Use Case diagrams identify the functionality provided by the system (use 
cases), the users who interact with the system (actors), and the association 
between the users and the functionality. Use Cases are used in the Analysis 
phase of software development to articulate the high-level requirements of the 
system. The primary goals of Use Case diagrams&nbsp;include:
<ul>
	<li>
	Providing a high-level view of what the system does
	</li><li>
	Identifying the users ("actors") of the system
	</li><li>
		Determining areas needing human-computer interfaces
	</li>
</ul>
Use Cases extend beyond pictorial diagrams. In fact, text-based use case 
descriptions are often used to supplement diagrams, and explore use case 
functionality in more detail.
<h2>Graphical Notation</h2>
The basic components of Use Case diagrams are the Actor, the Use Case, and the 
Association.
<p>
	<table cellpadding="10" width="100%">
		<tbody><tr>
			<td><strong>Actor</strong></td>
			<td>
				An Actor, as mentioned, is a user of the system, and is depicted using a stick 
				figure. The role of the user is written beneath the icon. Actors are not 
				limited to humans. If a system communicates with another application, and 
				expects input or delivers output, then that application can also be considered 
				an actor.</td>
			<td><img src="usecase.aspx_files/usecase-actor.png"></td>
		</tr>
		<tr>
			<td><strong>Use Case</strong></td>
			<td>A Use Case is functionality provided by the system, typically described as 
				verb+object (eg. Register Car, Delete User). Use Cases are depicted with an 
				ellipse. The name of the use case is written within the ellipse.</td>
			<td><img src="usecase.aspx_files/usecase-usecase.png"></td>
		</tr>
		<tr>
			<td><strong>Association</strong></td>
			<td>Associations are used to link Actors with Use Cases, and indicate that an Actor 
				participates in the Use Case in some form. Associations are depicted by a line 
				connecting the Actor and the Use Case.</td>
			<td><img src="usecase.aspx_files/usecase-association.png"></td>
		</tr>
	</tbody></table>
</p><p>
The following image shows how these three basic elements work together to form 
a use case diagram.
</p><p align="center"><img src="usecase.aspx_files/usecase-simpleexample.png">
</p>
<h2>Text Notation</h2>
Behind each Use Case is a series of actions to achieve the proper 
functionality, as well as alternate paths for instances where validation fails, 
or errors occur. These actions can be further defined in a Use Case 
description. Because this&nbsp;is not addressed in UML 1.4, there&nbsp;are no 
standards for Use Case descriptions. However, there are some common templates 
you can follow, and whole books on the subject writing of Use Case descriptions

.
<p>Common methods of writing Use Case descriptions include:
	</p><ul>
		<li>
		Write a paragraph describing the sequence of activities in the Use Case
		</li><li>
		List two columns, with the activities of the actor and the responses by the 
		system
		</li><li>
			Use a template (such as those from the Rational Unified Process or Alistair 
			Cockburn's book, Writing Effective Use Cases)&nbsp;identifying actors, 
			preconditions, postconditions, main success scenarios, and extensions.</li>
	</ul>
Remember, the goal of the process is to be able to communicate the requirements 
of the system, so use whichever method is best for your team and your 
organization. Here are examples of a paragraph and template use case 
description for our Use Case Diagram:
<p>
	<b>Create Bug Report (Paragraph Version)</b><br>
The Tester initiates a new bug report. The Tester indicates the source of the 
bug, a description of the problem, and the person to whom the bug should be 
assigned. The System records the bug as an open issue, and notifies the 
Assigned Person that a new bug has been submitted.
</p><p>
	<b>Create Bug Report (Template Version)</b><br>
	<table id="Table1" border="0" cellpadding="1" cellspacing="1" width="100%">
		<tbody><tr>
			<td><em>Primary Actor:</em></td>
			<td>Tester</td>
		</tr>
		<tr>
			<td><em>Goal in Context:</em></td>
			<td>Tester is testing an application and discovers a new bug. He/She wants to 
				report it so that it can be addressed.</td>
		</tr>
		<tr>
			<td><em>Scope:</em></td>
			<td>System - the quality assurance system for the XYZ Application</td>
		</tr>
		<tr>
			<td><em>Level:</em></td>
			<td>User</td>
		</tr>
		<tr>
			<td><em>Stakeholders and Interests:</em></td>
			<td>
				<p>
					Tester: wants to record a new bug<br>
					Assigned: wants to be notified of any new bugs<br>
					QA Manager: wants all bugs recorded</p>
			</td>
		</tr>
		<tr>
			<td><em>Precondition:</em></td>
			<td>none</td>
		</tr>
		<tr>
			<td><em>Trigger:</em></td>
			<td>Tester discovers a bug while testing an application</td>
		</tr>
		<tr>
			<td><em>Main Success Scenario:</em></td>
			<td>
				1. Tester initiates a new bug report.<br>
				2. System records bug with date of submission.<br>
				3. System notifies assigned user.<br>
			</td>
		</tr>
		<tr>
			<td><em>Extensions:</em></td>
			<td>1a. Tester does not know who to assign bug report to: System assigns bug to QA 
				Manager.</td>
		</tr>
		<tr>
			<td></td>
			<td></td>
		</tr>
	</tbody></table>
	<br>
	&nbsp;</p>


<!-- END CONTENT --></td></tr></tbody></table>
<br><br>


<hr align="center" width="90%">
<table valign="BOTTOM" class="footer" cellpadding="0" cellspacing="0" width="100%">
	<tbody><tr>
		<td align="center" height="19" valign="middle">
			<font face="Verdana" size="1"><b>Questions, comments, or suggestions? Contact us at <a href="mailto:info@dotnetcoders.com">
						info@dotnetcoders.com</a><br>
					© 2000-2003 <a href="http://www.dotnetcoders.com/">.netCoders</a>. All rights 
					reserved. <a href="http://www.dotnetcoders.com/web/TermsOfUse.aspx">
						Terms of Use</a></b></font>
		</td>
	</tr>
</tbody></table>


<!-- END OVERALL PAGE TABLE --></td></tr></tbody></table>
</body></html>